Use SSH-Agent
2016/04/23 |
Use SSH-Agent to automate inputting passphrase on key-pair authentication.
|
|
[1] | |
[2] | How to use SSH-Agent. |
# start SSH-Agent ubuntu@dlp:~$ eval `ssh-agent` Agent pid 1538 # add Identity ubuntu@dlp:~$ ssh-add Enter passphrase for /home/ubuntu/.ssh/id_rsa: Identity added: /home/ubuntu/.ssh/id_rsa (/home/ubuntu/.ssh/id_rsa) # confirm ubuntu@dlp:~$ ssh-add -l 2048 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:4c:b2 /home/ubuntu/.ssh/id_rsa (RSA) # try to conenct with SSH without passphrase ubuntu@dlp:~$ ssh node01.srv.world hostname node01.srv.world # exit from SSH-Agent ubuntu@dlp:~$ eval `ssh-agent -k` Agent pid 1285 killed |